# Maintainer: Robin Candau <antiz@archlinux.org>
# Contributor: Daniel Löbl <dloebl.2000@gmail.com>

pkgname=libcgif
pkgver=0.3.2
pkgrel=1
pkgdesc='A fast and lightweight GIF encoding library'
arch=('loong64' 'x86_64')
url="https://github.com/dloebl/cgif"
license=('MIT')
depends=('glibc')
makedepends=('meson')
source=(https://github.com/dloebl/cgif/archive/V${pkgver}/${pkgname}-${pkgver}.tar.gz)
sha256sums=('0abf83b7617f4793d9ab3a4d581f4e8d7548b56a29e3f95b0505f842cbfd7f95')

build() {
	meson build "cgif-${pkgver}" --prefix=/usr
	meson compile -C build
}

check() {
	meson test -C build
}

package() {
	meson install -C build --destdir "${pkgdir}"
	install -Dm 644 "cgif-${pkgver}/LICENSE" "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
}
